Favicon

You are here: Home > API Reference > AOSP > Android (Non Gms) Policies > List non-GMS Android policy templates

List non-GMS Android policy templates

Required Permission: mdm.aosp.policy.list

Retrieve available non-GMS Android policy templates as partial policy payloads that include both AOSP config and matching application assignments.

GET
https://api.applivery.io/v1/organizations/{organizationId}/mdm/aosp/enterprise/policies/templates
curl -X GET "https://api.applivery.io/v1/organizations/{organizationId}/mdm/aosp/enterprise/policies/templates" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
const response = await fetch("https://api.applivery.io/v1/organizations/{organizationId}/mdm/aosp/enterprise/policies/templates", {
  method: "GET",
  headers: {
    Authorization: "Bearer <YOUR_API_KEY>",
  },
});

const data = await response.json();
import requests

response = requests.get(
    "https://api.applivery.io/v1/organizations/{organizationId}/mdm/aosp/enterprise/policies/templates",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
)

data = response.json()

Request

Send your API key in the request header authorization
Example: Authorization: Bearer <token>

organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$

Responses

200 Response application/json
status boolean required
data array [object] required
templateId string required
Identifier of the predefined AOSP policy template.
≤ 256 characters
templateVersion integer required
Version of the predefined template payload.
≥ 0 · ≤ 9007199254740991
templatePolicy object required
Partial AOSP policy payload ready to merge into a policy create or update request.
config object required
AOSP policy config fragment required by the template. Application entries are paired with backend AOSP application assignments.
applications array [object] required
Backend AOSP application assignments matching the config applications. Templates materialize the enterprise-scoped AosApplication wrapper when it does not exist.
{
    "status": true,
    "data": [
        {
            "templateId": "string",
            "templateVersion": 0,
            "templatePolicy": {
                "config": {
                    "applications": [
                        {
                            "packageName": "string",
                            "installType": "string",
                            "roles": [
                                {
                                    "roleType": "string"
                                }
                            ]
                        }
                    ]
                },
                "applications": [
                    {
                        "aosApplicationId": "string",
                        "action": "forceInstall",
                        "updatePolicy": {},
                        "customAppConfig": {}
                    }
                ]
            }
        }
    ]
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}